import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

export default defineConfig({
  // base: './',
  server: {
    port: 8080,
    host: '0.0.0.0',
    proxy: {
      '/dev-api': {
        target: 'http://192.168.98.177:8080/',
        // target: 'http://192.168.18.2:8080/',
        changeOrigin: true,
        rewrite: path => path.replace(/^\/dev-api/, '')
      },
      '/cgt-api': {
        target: 'http://192.168.19.5/api.php',
        changeOrigin: true,
        rewrite: path => path.replace(/^\/cgt-api/, '')
      }
    }
  },
  plugins: [vue()]
})
